<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateVirtue extends Migrator
{
    public function up()
    {
        $table = $this->table('virtue',['comment'=>'功德表']);
//        $table->addColumn('user_id','integer',['limit'=>10,'comment'=>'用户id'])
//            ->addForeignKey('user_id', 'user', 'id', ['delete'=> 'CASCADE'])
//            ->addColumn('score','integer',['limit'=>10,'signed'=>false,'comment'=>'功德分'])
//            ->addColumn('create_time','integer',['limit'=>10,'signed'=>false,'comment'=>'创建时间'])
//            ->addColumn('update_time','integer',['limit'=>10,'signed'=>false,'comment'=>'更新时间'])
//            ->create();
    }
    public function down(){
        $this->dropTable('virtue');
    }
}
